<?php
	$item = $this->Item;
	$name = $item['name'];
	$address 	= $item['address'];
	$phone 		= $item['phone'];
	$website 	= $item['website'];
	$content 	= $item['content'];
	$content 	= str_replace("\\"," ",$content);
	$created 	= $item['created'];
	
	if(!empty($item['picture'])){
	    $linkImg	= FILES_URL . '/news/images450x450/' . $item['picture'];
	    $linkImg2	= FILES_URL . '/news/orignal/' . $item['picture'];
	    $picture 	= '<img src="'. $linkImg .'" alt="'.$name.'" />';
	    $image 		= '<img src="'. $linkImg .'" alt="'.$name.'" />';
    }else{
	    $linkImg	= FILES_URL . '/news/images100x100/no-image.jpg';
	    $picture 	= '<img src="'. $linkImg .'" alt="'.$name.'" />';
	    $image 		= '<img src="'. $linkImg .'" alt="'.$name.'" />';
    }
?>
<script type="text/javascript">
		function fancyBox(elem){
			elem = $(elem);
			if (!elem.data("fancybox")) {
				elem.data("fancybox", true);
				elem.fancybox({
					'titleShow' 	: false,
					'transitionIn'	: 'elastic',
					'transitionOut'	: 'elastic',
					'centerOnScroll': true
				}).trigger('click');
			}
			return false; 
		}
	</script>
<div class="left">
                <div class="content-left bag-white">
                	<div class="detail">
                    	<!--------------------BOX CONTENT (Start) -------------------->
                        <div class="box-cnt col-0">
                            <div class="bor-img">
                                <a onclick="return fancyBox(this);" id="various1" href="#inline1" title="<?php echo $name?>"><?php echo $picture?></a>
                            </div>
                            <div class="desc busi-sum">
                                <h1 class="color-blue"><?php echo $name?></h1>
                                <p class="creat-day"><?php echo $created?></p>
                                <p class="summary">
                                	<p><strong>Địa chỉ: </strong> <?php echo $address?></p>
	                          		<p><strong>Điện thoại: </strong> <?php echo $phone?></p>
	                          		<p><strong>Website: </strong> <?php echo $website?></p>
                                </p>
                            </div>
                            <div class="clear"></div>
                            <div class="line"></div>
                        </div>
                        <div class="clear"></div>
                        <div class="cnt-detail">
                        	<!--<h1 class="color-blue"><?php echo $name?></h1>-->
                        	<?php echo $content?>
                            <div class="relate-news mar-top-20">
                                <h3 class="color-blue">Các tin tức nổi bật</h3>
                                <div class="list-relate">
                                	<?php
                                		foreach ($this->Cat as $key => $val){
                                			$name = $val['name'];
                                			$lang = $this->arrParam['lang'];
						                    if(empty($lang)){
						                    	$lang = 'vi';
						                    }else{
						                    	$lang = $this->arrParam['lang'];
						                    }
						                    $urlOptions = array('module'=>'business','controller'=>'index',
																			'action'=>'detail',
																			'nname'=>$val['alias_name'],
																			'title'=>$val['alias'],
						                    								'nid'=> $val['cat_id'],
																			'id'=>$val['id'],
						                    								'lang'=>$lang);
						                    $linkDetail = $this->url($urlOptions,'business-detail');
                                	?>
                                    <p><a class="li" href="<?php echo $linkDetail?>"><?php echo $name?></a></p>
                                    <?php }?>
                                </div>
                            </div>
                            
                        </div>
                        <!--------------------BOX CONTENT (End) ----------------------> 
                    </div>
                </div>
                <!-----------------CONTENT (END) -------------------->
</div>      
				<div style="display: none;">
					<div id="inline1" style="width:auto;height:auto;overflow:auto;">
							<?php echo $image?>
					</div>
				</div>
<script>
	$(document).ready(function(){
		$('.list').removeClass('active');
		$('#business').addClass('active');
	})
</script>
